const DATABASEformatTime = date => {
    const year = date.getFullYear()
    const month = date.getMonth() + 1
    const day = date.getDate()
    const hour = date.getHours()
    const minute = date.getMinutes()
    const second = date.getSeconds()

    return `${year}-${month}-${day} ${hour}:${minute}:${second}`
}
const DATESUBFORMAT = (hm) => {
    console.log(hm);
    hm = hm / 1000;
    let hours = parseInt(hm / 3600)
    if (!hours) {
        return `00:00:00`
    }
    return `${hours}:00:00`

}
module.exports = {
    DATABASEformatTime,
    DATESUBFORMAT
}